3.2.3 \(\int \frac {A+B x+C x^2+D x^3}{x (a+b x^2)^3} \, dx\)

Optimal. Leaf size=130 \[ \frac {(a D+3 b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{8 a^{5/2} b^{3/2}}-\frac {A \log \left (a+b x^2\right )}{2 a^3}+\frac {A \log (x)}{a^3}+\frac {x (a D+3 b B)+4 A b}{8 a^2 b \left (a+b x^2\right )}+\frac {x (b B-a D)-a C+A b}{4 a b \left (a+b x^2\right )^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {1805, 823, 801, 635, 205, 260} \begin {gather*} \frac {x (a D+3 b B)+4 A b}{8 a^2 b \left (a+b x^2\right )}-\frac {A \log \left (a+b x^2\right )}{2 a^3}+\frac {A \log (x)}{a^3}+\frac {(a D+3 b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{8 a^{5/2} b^{3/2}}+\frac {x (b B-a D)-a C+A b}{4 a b \left (a+b x^2\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x + C*x^2 + D*x^3)/(x*(a + b*x^2)^3),x]

[Out]

(A*b - a*C + (b*B - a*D)*x)/(4*a*b*(a + b*x^2)^2) + (4*A*b + (3*b*B + a*D)*x)/(8*a^2*b*(a + b*x^2)) + ((3*b*B
+ a*D)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(8*a^(5/2)*b^(3/2)) + (A*Log[x])/a^3 - (A*Log[a + b*x^2])/(2*a^3)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 823

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> -Simp[((d + e*x)^(
m + 1)*(f*a*c*e - a*g*c*d + c*(c*d*f + a*e*g)*x)*(a + c*x^2)^(p + 1))/(2*a*c*(p + 1)*(c*d^2 + a*e^2)), x] + Di
st[1/(2*a*c*(p + 1)*(c*d^2 + a*e^2)), Int[(d + e*x)^m*(a + c*x^2)^(p + 1)*Simp[f*(c^2*d^2*(2*p + 3) + a*c*e^2*
(m + 2*p + 3)) - a*c*d*e*g*m + c*e*(c*d*f + a*e*g)*(m + 2*p + 4)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x]
 && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 1805

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[(c*x)^m*Pq,
 a + b*x^2, x], f = Coeff[PolynomialRemainder[(c*x)^m*Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[
(c*x)^m*Pq, a + b*x^2, x], x, 1]}, Simp[((a*g - b*f*x)*(a + b*x^2)^(p + 1))/(2*a*b*(p + 1)), x] + Dist[1/(2*a*
(p + 1)), Int[(c*x)^m*(a + b*x^2)^(p + 1)*ExpandToSum[(2*a*(p + 1)*Q)/(c*x)^m + (f*(2*p + 3))/(c*x)^m, x], x],
 x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && LtQ[p, -1] && ILtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {A+B x+C x^2+D x^3}{x \left (a+b x^2\right )^3} \, dx &=\frac {A b-a C+(b B-a D) x}{4 a b \left (a+b x^2\right )^2}-\frac {\int \frac {-4 A-\frac {(3 b B+a D) x}{b}}{x \left (a+b x^2\right )^2} \, dx}{4 a}\\ &=\frac {A b-a C+(b B-a D) x}{4 a b \left (a+b x^2\right )^2}+\frac {4 A b+(3 b B+a D) x}{8 a^2 b \left (a+b x^2\right )}+\frac {\int \frac {8 a A b+a (3 b B+a D) x}{x \left (a+b x^2\right )} \, dx}{8 a^3 b}\\ &=\frac {A b-a C+(b B-a D) x}{4 a b \left (a+b x^2\right )^2}+\frac {4 A b+(3 b B+a D) x}{8 a^2 b \left (a+b x^2\right )}+\frac {\int \left (\frac {8 A b}{x}+\frac {3 a b B+a^2 D-8 A b^2 x}{a+b x^2}\right ) \, dx}{8 a^3 b}\\ &=\frac {A b-a C+(b B-a D) x}{4 a b \left (a+b x^2\right )^2}+\frac {4 A b+(3 b B+a D) x}{8 a^2 b \left (a+b x^2\right )}+\frac {A \log (x)}{a^3}+\frac {\int \frac {3 a b B+a^2 D-8 A b^2 x}{a+b x^2} \, dx}{8 a^3 b}\\ &=\frac {A b-a C+(b B-a D) x}{4 a b \left (a+b x^2\right )^2}+\frac {4 A b+(3 b B+a D) x}{8 a^2 b \left (a+b x^2\right )}+\frac {A \log (x)}{a^3}-\frac {(A b) \int \frac {x}{a+b x^2} \, dx}{a^3}+\frac {(3 b B+a D) \int \frac {1}{a+b x^2} \, dx}{8 a^2 b}\\ &=\frac {A b-a C+(b B-a D) x}{4 a b \left (a+b x^2\right )^2}+\frac {4 A b+(3 b B+a D) x}{8 a^2 b \left (a+b x^2\right )}+\frac {(3 b B+a D) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{8 a^{5/2} b^{3/2}}+\frac {A \log (x)}{a^3}-\frac {A \log \left (a+b x^2\right )}{2 a^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 117, normalized size = 0.90 \begin {gather*} \frac {\frac {2 a^2 (-a (C+D x)+A b+b B x)}{b \left (a+b x^2\right )^2}+\frac {a (a D x+4 A b+3 b B x)}{b \left (a+b x^2\right )}-4 A \log \left (a+b x^2\right )+\frac {\sqrt {a} (a D+3 b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{3/2}}+8 A \log (x)}{8 a^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x + C*x^2 + D*x^3)/(x*(a + b*x^2)^3),x]

[Out]

((a*(4*A*b + 3*b*B*x + a*D*x))/(b*(a + b*x^2)) + (2*a^2*(A*b + b*B*x - a*(C + D*x)))/(b*(a + b*x^2)^2) + (Sqrt
[a]*(3*b*B + a*D)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(3/2) + 8*A*Log[x] - 4*A*Log[a + b*x^2])/(8*a^3)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x+C x^2+D x^3}{x \left (a+b x^2\right )^3} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(A + B*x + C*x^2 + D*x^3)/(x*(a + b*x^2)^3),x]

[Out]

IntegrateAlgebraic[(A + B*x + C*x^2 + D*x^3)/(x*(a + b*x^2)^3), x]

________________________________________________________________________________________

fricas [B]  time = 0.96, size = 488, normalized size = 3.75 \begin {gather*} \left [\frac {8 \, A a b^{3} x^{2} - 4 \, C a^{3} b + 12 \, A a^{2} b^{2} + 2 \, {\left (D a^{2} b^{2} + 3 \, B a b^{3}\right )} x^{3} - {\left ({\left (D a b^{2} + 3 \, B b^{3}\right )} x^{4} + D a^{3} + 3 \, B a^{2} b + 2 \, {\left (D a^{2} b + 3 \, B a b^{2}\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) - 2 \, {\left (D a^{3} b - 5 \, B a^{2} b^{2}\right )} x - 8 \, {\left (A b^{4} x^{4} + 2 \, A a b^{3} x^{2} + A a^{2} b^{2}\right )} \log \left (b x^{2} + a\right ) + 16 \, {\left (A b^{4} x^{4} + 2 \, A a b^{3} x^{2} + A a^{2} b^{2}\right )} \log \relax (x)}{16 \, {\left (a^{3} b^{4} x^{4} + 2 \, a^{4} b^{3} x^{2} + a^{5} b^{2}\right )}}, \frac {4 \, A a b^{3} x^{2} - 2 \, C a^{3} b + 6 \, A a^{2} b^{2} + {\left (D a^{2} b^{2} + 3 \, B a b^{3}\right )} x^{3} + {\left ({\left (D a b^{2} + 3 \, B b^{3}\right )} x^{4} + D a^{3} + 3 \, B a^{2} b + 2 \, {\left (D a^{2} b + 3 \, B a b^{2}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) - {\left (D a^{3} b - 5 \, B a^{2} b^{2}\right )} x - 4 \, {\left (A b^{4} x^{4} + 2 \, A a b^{3} x^{2} + A a^{2} b^{2}\right )} \log \left (b x^{2} + a\right ) + 8 \, {\left (A b^{4} x^{4} + 2 \, A a b^{3} x^{2} + A a^{2} b^{2}\right )} \log \relax (x)}{8 \, {\left (a^{3} b^{4} x^{4} + 2 \, a^{4} b^{3} x^{2} + a^{5} b^{2}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((D*x^3+C*x^2+B*x+A)/x/(b*x^2+a)^3,x, algorithm="fricas")

[Out]

[1/16*(8*A*a*b^3*x^2 - 4*C*a^3*b + 12*A*a^2*b^2 + 2*(D*a^2*b^2 + 3*B*a*b^3)*x^3 - ((D*a*b^2 + 3*B*b^3)*x^4 + D
*a^3 + 3*B*a^2*b + 2*(D*a^2*b + 3*B*a*b^2)*x^2)*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) - 2*(
D*a^3*b - 5*B*a^2*b^2)*x - 8*(A*b^4*x^4 + 2*A*a*b^3*x^2 + A*a^2*b^2)*log(b*x^2 + a) + 16*(A*b^4*x^4 + 2*A*a*b^
3*x^2 + A*a^2*b^2)*log(x))/(a^3*b^4*x^4 + 2*a^4*b^3*x^2 + a^5*b^2), 1/8*(4*A*a*b^3*x^2 - 2*C*a^3*b + 6*A*a^2*b
^2 + (D*a^2*b^2 + 3*B*a*b^3)*x^3 + ((D*a*b^2 + 3*B*b^3)*x^4 + D*a^3 + 3*B*a^2*b + 2*(D*a^2*b + 3*B*a*b^2)*x^2)
*sqrt(a*b)*arctan(sqrt(a*b)*x/a) - (D*a^3*b - 5*B*a^2*b^2)*x - 4*(A*b^4*x^4 + 2*A*a*b^3*x^2 + A*a^2*b^2)*log(b
*x^2 + a) + 8*(A*b^4*x^4 + 2*A*a*b^3*x^2 + A*a^2*b^2)*log(x))/(a^3*b^4*x^4 + 2*a^4*b^3*x^2 + a^5*b^2)]

________________________________________________________________________________________

giac [A]  time = 0.48, size = 128, normalized size = 0.98 \begin {gather*} -\frac {A \log \left (b x^{2} + a\right )}{2 \, a^{3}} + \frac {A \log \left ({\left | x \right |}\right )}{a^{3}} + \frac {{\left (D a + 3 \, B b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 \, \sqrt {a b} a^{2} b} + \frac {4 \, A a b^{2} x^{2} - 2 \, C a^{3} + 6 \, A a^{2} b + {\left (D a^{2} b + 3 \, B a b^{2}\right )} x^{3} - {\left (D a^{3} - 5 \, B a^{2} b\right )} x}{8 \, {\left (b x^{2} + a\right )}^{2} a^{3} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((D*x^3+C*x^2+B*x+A)/x/(b*x^2+a)^3,x, algorithm="giac")

[Out]

-1/2*A*log(b*x^2 + a)/a^3 + A*log(abs(x))/a^3 + 1/8*(D*a + 3*B*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^2*b) + 1/
8*(4*A*a*b^2*x^2 - 2*C*a^3 + 6*A*a^2*b + (D*a^2*b + 3*B*a*b^2)*x^3 - (D*a^3 - 5*B*a^2*b)*x)/((b*x^2 + a)^2*a^3
*b)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 184, normalized size = 1.42 \begin {gather*} \frac {3 B b \,x^{3}}{8 \left (b \,x^{2}+a \right )^{2} a^{2}}+\frac {D x^{3}}{8 \left (b \,x^{2}+a \right )^{2} a}+\frac {A b \,x^{2}}{2 \left (b \,x^{2}+a \right )^{2} a^{2}}+\frac {5 B x}{8 \left (b \,x^{2}+a \right )^{2} a}-\frac {D x}{8 \left (b \,x^{2}+a \right )^{2} b}+\frac {3 A}{4 \left (b \,x^{2}+a \right )^{2} a}+\frac {3 B \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 \sqrt {a b}\, a^{2}}-\frac {C}{4 \left (b \,x^{2}+a \right )^{2} b}+\frac {D \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 \sqrt {a b}\, a b}+\frac {A \ln \relax (x )}{a^{3}}-\frac {A \ln \left (b \,x^{2}+a \right )}{2 a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((D*x^3+C*x^2+B*x+A)/x/(b*x^2+a)^3,x)

[Out]

3/8/(b*x^2+a)^2*B/a^2*b*x^3+1/8/a/(b*x^2+a)^2*D*x^3+1/2/a^2/(b*x^2+a)^2*A*x^2*b+5/8/(b*x^2+a)^2*B/a*x-1/8/(b*x
^2+a)^2/b*x*D+3/4/(b*x^2+a)^2*A/a-1/4/(b*x^2+a)^2/b*C-1/2*A/a^3*ln(b*x^2+a)+3/8/(a*b)^(1/2)*B/a^2*arctan(1/(a*
b)^(1/2)*b*x)+1/8/a/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*D+A/a^3*ln(x)

________________________________________________________________________________________

maxima [A]  time = 2.90, size = 133, normalized size = 1.02 \begin {gather*} \frac {4 \, A b^{2} x^{2} + {\left (D a b + 3 \, B b^{2}\right )} x^{3} - 2 \, C a^{2} + 6 \, A a b - {\left (D a^{2} - 5 \, B a b\right )} x}{8 \, {\left (a^{2} b^{3} x^{4} + 2 \, a^{3} b^{2} x^{2} + a^{4} b\right )}} - \frac {A \log \left (b x^{2} + a\right )}{2 \, a^{3}} + \frac {A \log \relax (x)}{a^{3}} + \frac {{\left (D a + 3 \, B b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 \, \sqrt {a b} a^{2} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((D*x^3+C*x^2+B*x+A)/x/(b*x^2+a)^3,x, algorithm="maxima")

[Out]

1/8*(4*A*b^2*x^2 + (D*a*b + 3*B*b^2)*x^3 - 2*C*a^2 + 6*A*a*b - (D*a^2 - 5*B*a*b)*x)/(a^2*b^3*x^4 + 2*a^3*b^2*x
^2 + a^4*b) - 1/2*A*log(b*x^2 + a)/a^3 + A*log(x)/a^3 + 1/8*(D*a + 3*B*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^2
*b)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+B\,x+C\,x^2+x^3\,D}{x\,{\left (b\,x^2+a\right )}^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x + C*x^2 + x^3*D)/(x*(a + b*x^2)^3),x)

[Out]

int((A + B*x + C*x^2 + x^3*D)/(x*(a + b*x^2)^3), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((D*x**3+C*x**2+B*x+A)/x/(b*x**2+a)**3,x)

[Out]

Timed out

________________________________________________________________________________________